package com.mmy.service.car.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.car.TCarTypeRepository;
import com.mmy.domain.car.TCarType;
import com.mmy.service.car.TCarTypeService;

@Service
public class TCarTypeServiceImpl implements TCarTypeService {

	@Autowired
	TCarTypeRepository tCarTypeRepository;

	/**
	 * 查找全部
	 * 
	 * @param
	 * @return
	 */
	public List<TCarType> findAll() {
		// TODO Auto-generated method stub
		return tCarTypeRepository.findAll();
	}

	/**
	 * 获取最大值
	 * 
	 * @param
	 * @return
	 */
	public Object getMaxTypeID() {
		// TODO Auto-generated method stub
		return tCarTypeRepository.getMaxTypeID();
	}

	/**
	 * 根据名称查找
	 * 
	 * @param
	 * @return
	 */
	public List<TCarType> findByTypeName(String strTypeName) {
		// TODO Auto-generated method stub
		return tCarTypeRepository.findByTypeName(strTypeName);
	}

	/**
	 * 新增
	 * 
	 * @param
	 * @return
	 */
	public void save(TCarType tCarType) {
		// TODO Auto-generated method stub
		tCarTypeRepository.save(tCarType);
	}

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */
	public void delCarType(List<Integer> lstTypeID) {
		// TODO Auto-generated method stub
		tCarTypeRepository.delCarType(lstTypeID);
	}

	/**
	 * 通过id查找
	 * 
	 * @param
	 * @return
	 */
	public TCarType findByTypeID(int iTypeID) {
		// TODO Auto-generated method stub
		return tCarTypeRepository.findByTypeID(iTypeID);
	}



	/**
	 * 新建id
	 * 
	 * @param
	 * @return
	 */
	public void save(int typeID) {
		// TODO Auto-generated method stub
		tCarTypeRepository.save(typeID);
	}
}
